package com.gisterrier.client;

import java.util.ArrayList;
import java.util.TreeMap;

import com.common.shared.ClSelectionItem;
import com.common.shared.map.GisMapClickedObject;
import com.gisterrier.shared.BuildingCustomer;
import com.gisterrier.shared.BuildingCustomerShort;
import com.gisterrier.shared.Customer;
import com.gisterrier.shared.CustomerBuildings;
import com.gisterrier.shared.Map_Customer_to_Building;
import com.gisterrier.shared.Map_Customer_to_Building_Obj;
import com.gisterrier.shared.Map_Street_to_Street;
import com.gisterrier.shared.ObjSelectionresult;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

/**
 * The client side stub for the RPC service.
 */
@RemoteServiceRelativePath("gisterrier")
public interface GisTerrierService extends RemoteService {

	public ArrayList<ClSelectionItem> getRegions() throws Exception;

	public ArrayList<ClSelectionItem> getSubRegions(long regionId)
			throws Exception;

	public ArrayList<ClSelectionItem> getZones(Long regionId, Long subRegionId,
			Long cityId, Long streetid) throws Exception;

	public ArrayList<ClSelectionItem> getCities(long subRegionId)
			throws Exception;

	public ArrayList<ClSelectionItem> getStreets(long cityId) throws Exception;

	public ArrayList<ClSelectionItem> getTopType(int type) throws Exception;

	public ArrayList<ClSelectionItem> getItemsForType(int type, long parentId)
			throws Exception;

	public TreeMap<Integer, ArrayList<ClSelectionItem>> getAllTopTypes()
			throws Exception;

	public Customer getCustomer(int customerid) throws Exception;

	public CustomerBuildings getBuildingFor(double px, double py, int srid)
			throws Exception;

	public CustomerBuildings getCustomersForBuilding(CustomerBuildings b)
			throws Exception;

	public CustomerBuildings getCustomersForBuilding(double px, double py,
			int srid) throws Exception;

	public ArrayList<GisMapClickedObject> getGisMapClickedObjects(double px,
			double py, int srid) throws Exception;

	public Map_Street_to_Street getMap_Street_to_Street(
			long mapstreet_or_bill_street_id, boolean mapstreet)
			throws Exception;

	public Map_Customer_to_Building_Obj getMap_Customer_to_Building(
			long mapbuild_or_cust, boolean mapbuild) throws Exception;

	public Long insertMap_Street_to_Street(Map_Street_to_Street street)
			throws Exception;

	public Long insertMap_Customer_to_Building(
			Map_Customer_to_Building mapbuildCust) throws Exception;

	public ArrayList<Long> insertMap_Customer_to_Building(
			ArrayList<BuildingCustomerShort> mapbuildCusts) throws Exception;

	public ObjSelectionresult getObjSelectionresult(long building_id)
			throws Exception;

	public TreeMap<Integer, ArrayList<ClSelectionItem>> getAddressInfo(
			long raioni, long regioni, long cityid, long streetid)
			throws Exception;

	public BuildingCustomer getBuildingCustomer(GisMapClickedObject clObj)
			throws Exception;

	public ArrayList<BuildingCustomerShort> getCustomersForStreet(long street_id,Long zone)
			throws Exception;

	public ArrayList<BuildingCustomerShort> getShortCustomersForBuilding(
			long building_id) throws Exception;

	public GisMapClickedObject getBuilding(long building_id) throws Exception;

}
